﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FileCompare
{
    public partial class CheckExtension : Form
    {
        public CheckExtension()
        {
            InitializeComponent();
        }

        public CheckExtension(Dictionary<string, bool> _extensions)
        {
            InitializeComponent();

            lst_cbkExtension.Items.Clear();

            foreach (KeyValuePair<string, bool> aux in _extensions)
            {
                lst_cbkExtension.Items.Add(aux.Key, aux.Value);
            }
        }

        public List<string> ListChecked
        {
            get
            {
                List<string> _out = new List<string>();

                foreach (object itemCheked in lst_cbkExtension.CheckedItems)
                {
                    _out.Add(itemCheked.ToString());
                }  

                return _out;
            }
        }
    }
}
